package reflect;

import java.lang.reflect.Method;

public class ReflectDemo5 {
    public static void main(String[] args) throws Exception {
//        Person person = new Person();
//        person.say("wangwu");

        Class c=Class.forName("reflect.Person");
        Object o = c.newInstance();
        Method method = c.getMethod("say",String.class);
        method.invoke(o,"大家好");
    }
}
